package com.qcq.springcloud.clients;

import com.qcq.springcloud.clients.fallback.UserFeignApiFallBack;
import com.qcq.springcloud.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "user-service",fallback = UserFeignApiFallBack.class)
public interface UserFeignApi {

    @GetMapping("/user/{username}")
    public User queryByUsername(@PathVariable("username") String username);
}
